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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: C = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.y: E = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

i = A("i")
k = B("k")
b = C("b")
e = D("e")
d = E("d")
g = F("g")
c = B("c")
m = A("m")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: C = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.y: E = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

i = A("i")
k = B("k")
b = C("b")
e = D("e")
d = E("d")
g = F("g")
c = B("c")
m = A("m")

i.w = d
i.o = d
i.y = k
k.p = e
k.x = e
k.q = b
k.v = b
b.q = e
b.t = e
b.r = g
e.u = b
e.q = d
e.y = d
e.t = k
e.r = g
d.s = e
d.u = e
d.q = g
g.z = e
g.s = b
g.v = c
c.p = e
c.x = e
c.q = b
c.v = b
m.w = d
m.o = d
m.y = k
assert d.q.z.r.v.v.q.txt == "e"