class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.y: D = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.p: A = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.p: A = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

m.w = b
m.p = j
m.y = i
m.r = h
m.x = c
k.x = h
k.r = m
h.o = k
i.r = h
i.s = m
i.z = j
i.o = c
i.v = k
i.w = d
g.u = m
g.o = m
g.p = m
g.v = m
g.q = m
d.o = j
d.u = c
d.y = c
d.q = m
c.o = k
j.u = m
j.o = m
j.p = m
j.v = m
j.q = m
b.x = h
b.r = m
assert k.r.w.r.x.txt == "c"