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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.t: A = None
        self.y: E = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.t: A = None
        self.y: E = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

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

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