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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

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

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

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

m.z = j
m.x = a
m.r = i
d.p = a
d.w = f
d.o = c
d.q = b
h.s = m
h.t = m
h.v = j
h.x = b
h.q = i
a.u = b
a.p = h
a.v = j
a.t = i
j.u = f
f.v = h
f.y = i
c.p = a
c.w = i
c.o = d
c.q = b
i.v = b
i.y = f
b.s = l
b.t = l
b.v = j
b.x = h
b.q = f
l.z = j
l.x = a
l.r = i
assert i.y.y.v.q.y.v.txt == "b"