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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

g.s = i
g.t = i
g.q = b
g.r = m
g.u = m
g.o = d
c.x = d
c.t = b
c.u = b
c.y = b
c.o = m
b.v = i
b.w = c
b.y = g
b.o = a
i.y = m
i.z = d
i.r = a
i.t = b
d.v = b
a.v = d
a.z = d
m.s = i
m.t = i
m.q = b
m.r = g
m.u = g
m.o = d
assert g.q.w.y.o.txt == "a"