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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.x: F = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.x: C = None
        self.r: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.v: D = None
        self.x: A = None
        self.z: F = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.x: F = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.x: C = None
        self.r: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.v: D = None
        self.x: A = None
        self.z: F = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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

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