class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: G = None
        self.r: D = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.s: A = None
        self.u: H = None
        self.t: H = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

c = A("c")
m = B("m")
j = C("j")
e = D("e")
l = E("l")
a = F("a")
g = G("g")
d = H("d")

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.s: A = None
        self.u: H = None
        self.t: H = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

c = A("c")
m = B("m")
j = C("j")
e = D("e")
l = E("l")
a = F("a")
g = G("g")
d = H("d")

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