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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: A = None
        self.z: D = None
        self.u: A = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: A = None
        self.z: D = None
        self.u: A = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

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

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