class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.x: A = None
        self.o: F = None
        self.s: C = None
        self.q: D = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: E = None
        self.p: H = None
        self.q: F = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

f = A("f")
e = B("e")
i = C("i")
g = D("g")
a = E("a")
l = F("l")
b = G("b")
h = H("h")
c = A("c")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: E = None
        self.p: H = None
        self.q: F = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

f = A("f")
e = B("e")
i = C("i")
g = D("g")
a = E("a")
l = F("l")
b = G("b")
h = H("h")
c = A("c")
j = H("j")

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