class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.w: C = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

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

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

b = A("b")
g = B("g")
j = C("j")
e = D("e")
i = E("i")
a = F("a")
h = G("h")
n = E("n")
m = F("m")
c = G("c")

b.t = g
g.q = i
g.y = h
g.w = j
g.z = c
j.w = c
j.q = b
j.y = g
e.v = h
e.u = g
e.y = b
i.z = g
i.q = g
i.p = j
i.r = c
a.y = i
a.v = e
a.x = e
a.r = n
a.z = j
a.o = m
a.p = b
h.p = m
h.t = a
h.x = c
h.y = c
h.u = n
h.r = e
n.z = g
n.q = g
n.p = j
n.r = c
m.y = i
m.r = i
m.v = e
m.x = e
m.z = j
m.o = a
m.p = b
c.p = a
c.t = m
c.x = h
c.y = h
c.u = n
c.r = e
assert g.w.w.p.o.x.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.w: C = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

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

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

b = A("b")
g = B("g")
j = C("j")
e = D("e")
i = E("i")
a = F("a")
h = G("h")
n = E("n")
m = F("m")
c = G("c")

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