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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

d = A("d")
m = B("m")
b = C("b")
l = D("l")
h = E("h")
i = F("i")
e = G("e")
c = G("c")

d.w = e
d.y = c
d.r = i
d.q = i
d.o = h
d.t = b
m.z = b
m.u = l
m.v = e
b.v = l
l.s = i
l.o = h
h.r = e
h.u = e
i.t = m
e.u = l
e.q = i
e.s = i
e.w = b
e.y = b
e.o = m
e.p = m
c.u = l
c.q = i
c.s = i
c.w = b
c.y = b
c.o = m
c.p = m
assert l.s.t.u.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.r: F = None
        self.o: E = None
        self.t: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

d = A("d")
m = B("m")
b = C("b")
l = D("l")
h = E("h")
i = F("i")
e = G("e")
c = G("c")

d.w = e
d.y = c
d.r = i
d.q = i
d.o = h
d.t = b
m.z = b
m.u = l
m.v = e
b.v = l
l.s = i
l.o = h
h.r = e
h.u = e
i.t = m
e.u = l
e.q = i
e.s = i
e.w = b
e.y = b
e.o = m
e.p = m
c.u = l
c.q = i
c.s = i
c.w = b
c.y = b
c.o = m
c.p = m
assert l.s.t.u.s.t.txt == "m"