class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: C = None
        self.p: E = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.q: B = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.o: A = None
        self.t: B = None
        self.q: D = None
        self.v: A = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.q: B = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.o: A = None
        self.t: B = None
        self.q: D = None
        self.v: A = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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