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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.v: H = None
        self.p: I = None
        self.r: D = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: A = None
        self.z: H = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: A = None
        self.z: B = None
        self.x: B = None
        self.q: A = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.q: C = None
        self.w: D = None
        self.p: D = None
        self.txt = txt

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

j.p = b
j.q = f
j.z = n
j.t = l
j.o = l
j.w = l
j.v = h
j.r = c
l.z = h
l.y = f
l.v = i
l.p = n
l.r = c
l.x = b
h.z = i
h.r = l
h.q = b
h.v = c
c.y = f
c.x = l
c.r = l
c.u = b
c.z = d
c.w = d
c.t = j
d.p = n
d.q = j
d.y = j
d.z = i
f.y = c
f.p = h
b.r = f
b.p = j
b.q = j
b.z = l
b.x = l
b.y = l
b.u = c
i.t = j
n.o = j
n.s = c
n.w = c
n.p = c
n.q = h
assert j.t.r.y.p.v.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.z: I = None
        self.t: B = None
        self.o: B = None
        self.v: C = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.v: H = None
        self.p: I = None
        self.r: D = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: A = None
        self.z: H = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: A = None
        self.z: B = None
        self.x: B = None
        self.q: A = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.q: C = None
        self.w: D = None
        self.p: D = None
        self.txt = txt

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

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