class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.w: A = None
        self.v: I = None
        self.q: C = None
        self.x: C = None
        self.r: F = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: I = None
        self.u: B = None
        self.q: D = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.s: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: H = None
        self.y: I = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

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

e = A("e")
j = B("j")
b = C("b")
f = D("f")
c = E("c")
a = F("a")
k = G("k")
n = H("n")
g = I("g")
l = C("l")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.w: A = None
        self.v: I = None
        self.q: C = None
        self.x: C = None
        self.r: F = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: I = None
        self.u: B = None
        self.q: D = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.s: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: H = None
        self.y: I = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

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

e = A("e")
j = B("j")
b = C("b")
f = D("f")
c = E("c")
a = F("a")
k = G("k")
n = H("n")
g = I("g")
l = C("l")

e.w = l
e.t = a
e.q = n
e.v = j
j.p = e
j.w = e
j.u = g
j.v = g
j.q = b
j.x = b
j.r = a
j.o = a
j.t = f
b.t = c
b.s = g
b.u = j
b.q = f
b.x = f
b.o = e
f.y = k
c.t = b
c.u = k
c.s = k
c.y = l
a.z = l
a.x = n
a.y = g
a.p = f
k.r = f
k.s = a
n.u = g
n.y = e
n.z = c
g.r = f
g.y = b
l.t = c
l.s = g
l.u = j
l.q = f
l.x = f
l.o = e
assert b.q.y.r.txt == "f"