class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.u: G = None
        self.v: G = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.r: A = None
        self.z: D = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: A = None
        self.o: I = None
        self.y: F = None
        self.p: B = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.v: D = None
        self.o: F = None
        self.q: F = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.p: G = None
        self.txt = txt

b = A("b")
h = B("h")
c = C("c")
d = D("d")
f = E("f")
e = F("e")
k = G("k")
n = H("n")
g = I("g")
j = F("j")

b.o = f
b.r = c
b.u = k
b.v = k
b.p = n
h.o = k
h.w = e
h.r = b
h.z = d
h.t = d
h.v = f
c.s = k
c.x = b
c.o = g
c.y = j
c.p = h
c.v = e
c.u = d
d.z = f
d.q = n
d.v = c
f.w = b
e.r = j
e.o = j
e.q = j
e.s = c
e.v = d
e.z = f
e.x = k
k.v = c
k.t = c
k.s = b
k.y = f
n.s = e
n.v = c
g.t = n
g.r = c
g.p = k
j.r = e
j.o = e
j.q = e
j.s = c
j.v = d
j.z = f
j.x = k
assert g.r.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.u: G = None
        self.v: G = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.r: A = None
        self.z: D = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: A = None
        self.o: I = None
        self.y: F = None
        self.p: B = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.v: D = None
        self.o: F = None
        self.q: F = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.p: G = None
        self.txt = txt

b = A("b")
h = B("h")
c = C("c")
d = D("d")
f = E("f")
e = F("e")
k = G("k")
n = H("n")
g = I("g")
j = F("j")

b.o = f
b.r = c
b.u = k
b.v = k
b.p = n
h.o = k
h.w = e
h.r = b
h.z = d
h.t = d
h.v = f
c.s = k
c.x = b
c.o = g
c.y = j
c.p = h
c.v = e
c.u = d
d.z = f
d.q = n
d.v = c
f.w = b
e.r = j
e.o = j
e.q = j
e.s = c
e.v = d
e.z = f
e.x = k
k.v = c
k.t = c
k.s = b
k.y = f
n.s = e
n.v = c
g.t = n
g.r = c
g.p = k
j.r = e
j.o = e
j.q = e
j.s = c
j.v = d
j.z = f
j.x = k
assert g.r.p.v.txt == "f"