class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.r: F = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

e.o = f
e.z = f
e.v = j
e.r = m
e.p = a
a.r = g
k.x = l
k.u = g
j.r = h
j.v = a
j.t = k
j.p = k
j.u = g
g.t = k
g.q = f
g.s = m
g.o = j
g.v = e
g.r = h
m.w = g
l.r = m
l.v = a
l.t = k
l.p = k
l.u = g
f.r = g
h.w = g
assert j.r.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.r: F = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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