class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: C = None
        self.u: F = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
c = C("c")
h = D("h")
n = E("n")
b = F("b")
d = G("d")
e = F("e")

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
c = C("c")
h = D("h")
n = E("n")
b = F("b")
d = G("d")
e = F("e")

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