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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.s: E = None
        self.o: E = None
        self.r: F = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.w: E = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.s: E = None
        self.o: E = None
        self.r: F = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.w: E = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

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