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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: C = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: B = None
        self.x: F = None
        self.s: B = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: C = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: B = None
        self.x: F = None
        self.s: B = None
        self.y: F = None
        self.txt = txt

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

k.r = e
k.p = l
m.x = h
m.z = c
m.y = e
m.o = k
h.q = b
h.o = c
h.z = l
h.s = f
h.w = a
f.o = b
f.s = a
e.v = a
e.q = b
e.y = l
l.p = e
l.w = m
l.s = m
l.x = a
l.y = a
a.p = e
a.w = m
a.x = l
a.y = l
a.s = b
j.q = m
j.o = c
j.z = a
j.s = f
j.w = l
b.x = h
b.z = h
b.y = e
b.o = k
c.q = m
c.o = h
c.z = a
c.s = f
c.w = l
assert k.p.y.s.txt == "b"