class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.t: F = None
        self.y: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.q: E = None
        self.w: D = None
        self.p: B = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.q: E = None
        self.w: D = None
        self.p: B = None
        self.o: B = None
        self.txt = txt

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

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