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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.q: D = None
        self.u: A = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.q: D = None
        self.u: A = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.r: C = None
        self.txt = txt

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

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

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