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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: C = None
        self.t: G = None
        self.v: E = None
        self.u: H = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.txt = txt

g = A("g")
e = B("e")
k = C("k")
d = D("d")
b = E("b")
a = F("a")
m = G("m")
f = H("f")
j = A("j")

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: C = None
        self.t: G = None
        self.v: E = None
        self.u: H = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.txt = txt

g = A("g")
e = B("e")
k = C("k")
d = D("d")
b = E("b")
a = F("a")
m = G("m")
f = H("f")
j = A("j")

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