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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

b = A("b")
k = B("k")
d = C("d")
e = D("e")
h = E("h")
f = F("f")
g = C("g")
l = C("l")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

b = A("b")
k = B("k")
d = C("d")
e = D("e")
h = E("h")
f = F("f")
g = C("g")
l = C("l")
j = E("j")

b.r = e
b.z = e
b.w = g
b.p = g
k.x = h
k.t = b
d.y = f
d.r = b
d.v = b
d.u = b
d.t = g
d.s = e
e.t = f
e.y = f
e.p = h
e.x = k
e.o = k
e.s = b
h.w = l
f.r = j
f.t = h
g.y = f
g.r = b
g.v = b
g.u = b
g.t = d
g.s = e
l.y = f
l.r = b
l.v = b
l.u = b
l.t = d
l.s = e
j.w = l
assert l.s.p.w.y.t.w.txt == "l"