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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: G = None
        self.p: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.q: H = None
        self.o: A = None
        self.y: C = None
        self.p: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: H = None
        self.z: D = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: G = None
        self.p: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.q: H = None
        self.o: A = None
        self.y: C = None
        self.p: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: H = None
        self.z: D = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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