class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: D = None
        self.w: D = None
        self.p: B = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.z: D = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.o: D = None
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

h = A("h")
i = B("i")
f = C("f")
d = D("d")
a = E("a")
j = C("j")
k = B("k")
b = B("b")
g = D("g")

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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.z: D = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.o: D = None
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

h = A("h")
i = B("i")
f = C("f")
d = D("d")
a = E("a")
j = C("j")
k = B("k")
b = B("b")
g = D("g")

h.u = j
h.q = d
h.w = g
h.y = g
h.p = k
i.w = g
f.s = j
f.q = j
f.z = g
f.u = g
d.v = f
d.s = h
d.o = g
d.x = g
d.t = b
a.o = g
j.s = f
j.q = f
j.z = d
j.u = d
k.w = g
b.w = d
g.v = j
g.s = h
g.o = d
g.x = d
g.t = i
assert j.q.q.s.z.s.y.txt == "g"