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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.r: C = None
        self.p: A = None
        self.q: A = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.txt = txt

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

i = A("i")
l = B("l")
n = C("n")
d = D("d")
e = E("e")
f = F("f")
c = A("c")
k = F("k")
h = C("h")

i.x = n
i.u = n
i.v = c
i.r = d
i.s = h
l.r = c
l.z = k
l.s = d
l.q = n
l.x = e
n.o = e
n.t = d
n.v = d
n.r = h
n.p = i
n.q = c
d.w = c
d.s = l
e.w = l
e.p = l
f.t = k
f.z = e
f.w = c
c.x = n
c.s = n
c.u = h
c.v = i
c.r = d
k.t = f
k.z = e
k.w = i
h.o = e
h.t = d
h.v = d
h.r = n
h.p = i
h.q = i
assert d.w.s.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.v: A = None
        self.r: D = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.r: C = None
        self.p: A = None
        self.q: A = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.txt = txt

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

i = A("i")
l = B("l")
n = C("n")
d = D("d")
e = E("e")
f = F("f")
c = A("c")
k = F("k")
h = C("h")

i.x = n
i.u = n
i.v = c
i.r = d
i.s = h
l.r = c
l.z = k
l.s = d
l.q = n
l.x = e
n.o = e
n.t = d
n.v = d
n.r = h
n.p = i
n.q = c
d.w = c
d.s = l
e.w = l
e.p = l
f.t = k
f.z = e
f.w = c
c.x = n
c.s = n
c.u = h
c.v = i
c.r = d
k.t = f
k.z = e
k.w = i
h.o = e
h.t = d
h.v = d
h.r = n
h.p = i
h.q = i
assert d.w.s.q.r.txt == "d"