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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.u: H = None
        self.t: A = None
        self.r: C = None
        self.p: B = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.p: B = None
        self.z: C = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: E = None
        self.v: E = None
        self.p: F = None
        self.u: F = None
        self.s: F = None
        self.r: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.u: H = None
        self.t: A = None
        self.r: C = None
        self.p: B = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.p: B = None
        self.z: C = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: E = None
        self.v: E = None
        self.p: F = None
        self.u: F = None
        self.s: F = None
        self.r: F = None
        self.t: E = None
        self.txt = txt

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

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

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